package com.uchengwang.ui.self.banner.holder;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.uchengwang.functions.image.ImageManager;

import java.io.File;

/**
 * Created by U城网 on 2017/3/19.
 */

public class FileImageHolderView implements Holder<String>  {
    private ImageView imageView;
    @Override
    public View createView(Context context) {
        imageView = new ImageView(context);
        imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);

        return imageView;
    }

    @Override
    public void UpdateUI(Context context, int position, String data) {
        ImageManager.getInstance().loadImage(context, imageView, new File(data), ImageManager.ImageType.NARMOL);
    }
}
